<template>
  
  <div id="app">
    <loading v-show="$root.bLoading"/>
    <!-- <app-header v-if="$root.bNav"></app-header> -->
    <!-- <router-view></router-view> -->
    <app-footer v-show="$root.bFoot"></app-footer>
  </div>
  
</template>

<script>


import AppHeader from './header.vue'
import AppFooter from './footer.vue'
import Loading from '../components/hq-loading/hq-loading.vue'




export default {
  
  
  name: 'App',
  data(){
    return {
    }
  },
  components: {
    AppFooter,AppHeader,Loading
  },
  methods:{},
  
    watch:{
    	$route:{
        handler(nextValue){
          console.log('watch');
          let path = nextValue.path;//String
          if(/home|follow|column/.test(path)){
            this.$root.bNav=this.$root.bFoot=true;
          }
          if(/detail|login|reg/.test(path)){
            this.$root.bNav=this.$root.bFoot=false;
          }
          if(/user/.test(path)){
            this.$root.bNav=false;
            this.$root.bFoot=true;
          }
        },
        immediate:true
      }
    }
  
}
</script>

<style>


</style>
